package com.corpgovernment.common.enums;

import java.util.stream.Stream;

/**
 * @author ：xks
 * @date ：Created in 2022/9/13 18:59
 * @description：国际机票需求单状态
 * @modified By：
 * @version: $
 */
public enum FlightintlDemandStatusEnum {
    PS("PS", "待提交", "1"),
    RP("RP", "待报价", "2"),
    TP("TP", "待处理", "3"),
    TW("TW", "待出票", "4"),
    TA("TA", "已出票", "5"),
    CA("CA", "已取消", "6"),
    AC("AC", "自动取消", "6"),
    ;


    public static FlightintlDemandStatusEnum getByCode(String code) {
        return Stream.of(FlightintlDemandStatusEnum.values()).filter(p -> p.getCode().equals(code)).findFirst().orElse(null);
    }

    FlightintlDemandStatusEnum(String code, String desc, String frontCode) {
        this.code = code;
        this.desc = desc;
        this.frontCode = frontCode;
    }

    private String code;
    private String desc;
    private String frontCode;

    public String getFrontCode() {
        return frontCode;
    }

    public void setFrontCode(String frontCode) {
        this.frontCode = frontCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
